import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, map } from 'rxjs';
import { AnyJson } from './data-types/common.type';
import { ServicesModule } from './services.module';

@Injectable({
  providedIn: ServicesModule
})
export class MatchService {

  constructor(private http: HttpClient) { }
  getMatchNewsList(params: AnyJson): Observable<AnyJson> {
    return this.http.get('https://contest.snzo.cn/knowledge/api/news/getNewsList', { params })
      .pipe(map((res) => res as AnyJson));
  }
}
